<?php
/**
 * @author Arsene Tochemey GANDOTE<arsene.gandote@yahoo.com>
 * @access public
 * @version 1.0
 * @copyright (c) 2011 - Tochemey. You are free to use this class.
 * 				  Modify it the way you want it.
 * 				  Please let me know about any modifications done.
 */
# Instance of Role Model
# Get the user session data
$loggedUser =  $this->Session->read('userSessionData');
?>
<div style="display: none;">
  <div id="account-form-window" style="margin: 20px 5px 5px 5px;">
	<div class="account-settings-prompt" ></div>
	<form id="account-form" class="account-form" name="account-form" >	
       <table cellspacing="10">
            <tr>
                <td>User Name:</td>
                <td> 
                    <input name="username" type="text" class="validate[required,custom[noSpecialCaracters]] username"  id="username" value="<?php echo $loggedUser['username']; ?>" />
                </td>
            </tr>
            <tr>
                <td>First Name: </td>
                <td> 
                    <input name="first_name" type="text" class="validate[required,custom[noSpecialCaracters]] first_name"  id="first_name" value="<?php echo $loggedUser['first_name']; ?>" />
                </td>
            </tr>
            <tr>
                <td>Last Name: </td>
                <td> 
                    <input name="last_name" type="text" class="validate[required,custom[noSpecialCaracters]] last_name"  id="last_name" value="<?php echo $loggedUser['last_name']; ?>" />
                </td>
            </tr>
            <tr>
                <td>Reset Password: </td>
                <td> 
                    <input type="checkbox" name="reset-pass-check" id="reset-pass-check" />
                </td>
            </tr>
             <tr>
                <td colspan="2">
                     <div class="reset-password-holder" style="display: none; border:1px solid #b2b2b2; border-radius: 5px;" id="reset-password-holder">
                         <table cellspacing="10">
        				    <tr>
                                <td>Old Password</td>
                                <td>
                                    <input type="password" name="old_password"  id="old_password" class="validate[optional] password"/>
                                </td>
                            </tr>
        					<tr>
                                <td>New Password</td>
        					    <td>
                                    <input type="password" name="password_1"  id="password_1" class="validate[optional] password"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Retype New Password</td>
        					    <td>
                                <input type="password" name="password_2"  id="password_2" class="validate[optional,equals[password_1]]"/>
                                </td>
                            </tr>
        			     </table>
                     </div>
                </td>
            </tr>
             <tr>
                <td>
                    <input type="hidden" name="account_upt_id" id="account_upt_id" value="<?php echo $loggedUser['id']; ?>"/>
                </td>
                <td> 
                    <button type="button" class="save" id="account-save-btn"><?php echo $this->Html->image('ico-49.gif', array('width' => '16', 'height' => '16', 'align' => 'left', 'border' => '0')); ?>&nbsp;Save</button>
                    <button type="reset" class="cancel" id="account-cancel-btn"><?php echo $this->Html->image('ico-43.png', array('width' => '16', 'height' => '16', 'align' => 'left', 'border' => '0')); ?>&nbsp;Cancel</button>
                </td>
            </tr>
        </table>
	</form>
  </div>
</div>
   
<?php

?>
 